package com.allan.wiki_project.service;

import com.allan.wiki_project.domain.Demo;
import com.allan.wiki_project.domain.DemoExample;
import com.allan.wiki_project.mapper.DemoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DemoService {

    @Resource
    private DemoMapper demoMapper;

    public List<Demo> list() {
        return demoMapper.selectByExample(new DemoExample());
    }

    public Demo selectById(Long id){
        return demoMapper.selectByPrimaryKey(id);
    }
}
